package com.fy.login;

import javax.security.auth.login.LoginException;
import java.util.HashMap;
import java.util.Map;

/**
 * @author zhufeifei 2022/8/9
 **/

public class FixedUserService implements IUserService {
    static Map<String,char[]> PWD_MAP = new HashMap<>();
    static {
        PWD_MAP.put("zolmk", "123".toCharArray());
        PWD_MAP.put("zff", "123456".toCharArray());
    }
    @Override
    public char[] getPwd(String s) throws LoginException {
        return PWD_MAP.getOrDefault(s, new char[0]);
    }
}
